import telnetlib

def check_proxy_effect(ip,port,timeout=5):
    try:
        tn = telnetlib.Telnet(ip, port=port, timeout=timeout)
    except Exception as e:
        print('该代理IP  无效  ip>>{} {}'.format(ip,port))
        return False
    else:
        print('该代理IP  有效')
        return True

